/*
 * Default style sheet on Linux Platforms with focus highlighting flag enabled
 */

/*****************************************************************************
 * DockContainerWidget
 *****************************************************************************/
Qx--DockContainerWidget {
        background: palette(window);
}


/*****************************************************************************
 * DockSplitter
 *****************************************************************************/
Qx--DockContainerWidget > QSplitter{
        padding: 1 0 1 0;
}


Qx--DockContainerWidget Qx--DockSplitter::handle {
        background: palette(dark);
}


/*****************************************************************************
 * DockAreaWidget
 *****************************************************************************/
Qx--DockAreaWidget {
        background: palette(window);
}

Qx--DockAreaWidget #tabsMenuButton::menu-indicator {
        image: none;
}


Qx--DockTitleBarButton {
        padding: 0px 0px;
}


#tabsMenuButton {
        qproperty-icon: url(:/dock/images/tabs-menu-button.svg);
        qproperty-iconSize: 16px;
}


#dockAreaCloseButton {
        qproperty-icon: url(:/dock/images/close-button.svg),
                url(:/dock/images/close-button-disabled.svg) disabled;
        qproperty-iconSize: 16px;
}


#detachGroupButton {
        qproperty-icon: url(:/dock/images/detach-button.svg),
                url(:/dock/images/detach-button-disabled.svg) disabled;
        qproperty-iconSize: 16px;
}



/*****************************************************************************
 * DockAreaTitleBar
 *****************************************************************************/
Qx--DockAreaTitleBar {
        background: transparent;
        border-bottom: 2px solid palette(light);
        padding-bottom: 0px;
}

Qx--DockAreaWidget[focused="true"] Qx--DockAreaTitleBar {
        background: transparent;
        border-bottom: 2px solid palette(highlight);
        padding-bottom: 0px;
}


/*****************************************************************************
 * DockWidgetTab and close button styling
 *****************************************************************************/
Qx--DockWidgetTab {
        background: palette(window);
        border-color: palette(light);
        border-style: solid;
        border-width: 0 1px 0 0;
        padding: 0 0px;
}

Qx--DockWidgetTab[activeTab="true"] {
        background: qlineargradient(spread : pad, x1 : 0, y1 : 0, x2 : 0, y2 : 0.5, stop : 0
                palette(window), stop:1 palette(light));
        /*background: palette(highlight);*/
}

Qx--DockWidgetTab QLabel {
        color: palette(dark);
}

Qx--DockWidgetTab[activeTab="true"] QLabel {
        color: palette(foreground);
}


#tabCloseButton {
        margin-top: 2px;
        background: none;
        border: none;
        padding: 0px -2px;
        qproperty-icon: url(:/dock/images/close-button.svg),
                url(:/dock/images/close-button-disabled.svg) disabled;
        qproperty-iconSize: 16px;
}

#tabCloseButton:hover {
        /*border: 1px solid rgba(0, 0, 0, 32);*/
        background: rgba(0, 0, 0, 24);
}

#tabCloseButton:pressed {
        background: rgba(0, 0, 0, 48);
}


/* Focus related styling */
Qx--DockWidgetTab[focused="true"] {
        background: palette(highlight);
        border-color: palette(highlight);
}

Qx--DockWidgetTab[focused="true"] > #tabCloseButton {
        qproperty-icon: url(:/dock/images/close-button-focused.svg)
}

Qx--DockWidgetTab[focused="true"] > #tabCloseButton:hover {
        background: rgba(255, 255, 255, 48);
}

Qx--DockWidgetTab[focused="true"] > #tabCloseButton:pressed {
        background: rgba(255, 255, 255, 92);
}

Qx--DockWidgetTab[focused="true"] QLabel {
        color: palette(light);
}


/*****************************************************************************
 * DockWidget
 *****************************************************************************/
Qx--DockWidget {
        background: palette(light);
        border-color: palette(light);
        border-style: solid;
        border-width: 1px 0 0 0;
}


QScrollArea#dockWidgetScrollArea {
        padding: 0px;
        border: none;
}



/*****************************************************************************
 * Floating widget styling
 *****************************************************************************/
Qx--DockFloatingWidgetTitleBar {
    qproperty-maximizeIcon: url(:/dock/images/maximize-button.svg);
    qproperty-normalIcon: url(:/dock/images/restore-button.svg);
}


/* does not properly work on KDE
Qx--DockFloatingContainer[isActiveWindow="true"] Qx--DockFloatingWidgetTitleBar {
        background: palette(highlight);
        qproperty-maximizeIcon: url(:/dock/images/maximize-button-focused.svg);
        qproperty-normalIcon: url(:/dock/images/restore-button-focused.svg);
}

Qx--DockFloatingContainer[isActiveWindow="true"] #floatingTitleLabel {
        color: palette(light);
}
*/

#floatingTitleCloseButton, #floatingTitleMaximizeButton {
   qproperty-iconSize: 16px;
   border: none;
   margin: 6px 3px 6px 3px;
}


#floatingTitleCloseButton {
   qproperty-icon: url(:/dock/images/close-button.svg);
}


#floatingTitleCloseButton:hover, #floatingTitleMaximizeButton:hover {
    background: rgba(0, 0, 0, 24);
    border: none;
}


#floatingTitleCloseButton:pressed, #floatingTitleMaximizeButton:pressed {
    background: rgba(0, 0, 0, 48);
}


Qx--DockFloatingContainer[isActiveWindow="true"] #floatingTitleMaximizeButton {
    qproperty-iconSize: 16px;
}


/* does not properly work on KDE
Qx--DockFloatingContainer[isActiveWindow="true"] #floatingTitleCloseButton {
    qproperty-icon: url(:/dock/images/close-button-focused.svg);
    qproperty-iconSize: 16px;
}

Qx--DockFloatingContainer[isActiveWindow="true"] #floatingTitleCloseButton:hover,
Qx--DockFloatingContainer[isActiveWindow="true"] #floatingTitleMaximizeButton:hover {
    background: rgba(255, 255, 255, 48);
}


Qx--DockFloatingContainer[isActiveWindow="true"] #floatingTitleCloseButton:pressed,
Qx--DockFloatingContainer[isActiveWindow="true"] #floatingTitleMaximizeButton:pressed  {
    background: rgba(255, 255, 255, 92);
}
*/


/*****************************************************************************
 *
 * Styling of auto hide functionality
 *
 *****************************************************************************/


/*****************************************************************************
 * DockAutoHideTab
 *****************************************************************************/
Qx--DockAutoHideTab {
        qproperty-iconSize: 16px 16px;/* this is optional in case you would like to change icon size*/
        background: none;
        border: none;
        padding-left: 2px;
        padding-right: 0px;
        text-align: center;
        min-height: 20px;
        padding-bottom: 2px;
}


Qx--DockAutoHideTab:hover
{
        color: palette(highlight);
}


Qx--DockAutoHideTab[iconOnly="false"][sideBarLocation="0"],
Qx--DockAutoHideTab[iconOnly="false"][sideBarLocation="2"]  {
        border-top: 6px solid rgba(0, 0, 0, 48);
}


Qx--DockAutoHideTab[iconOnly="false"][sideBarLocation="1"],
Qx--DockAutoHideTab[iconOnly="false"][sideBarLocation="3"] {
        border-bottom: 6px solid rgba(0, 0, 0, 48);
}



Qx--DockAutoHideTab:hover[iconOnly="false"][sideBarLocation="0"],
Qx--DockAutoHideTab:hover[iconOnly="false"][sideBarLocation="2"],
Qx--DockAutoHideTab[iconOnly="false"][sideBarLocation="0"][activeTab="true"],
Qx--DockAutoHideTab[iconOnly="false"][sideBarLocation="2"][activeTab="true"]  {
        border-top: 6px solid palette(highlight);
}


Qx--DockAutoHideTab:hover[iconOnly="false"][sideBarLocation="1"],
Qx--DockAutoHideTab:hover[iconOnly="false"][sideBarLocation="3"],
Qx--DockAutoHideTab[iconOnly="false"][sideBarLocation="1"][activeTab="true"],
Qx--DockAutoHideTab[iconOnly="false"][sideBarLocation="3"][activeTab="true"] {
        border-bottom: 6px solid palette(highlight);
}


/**
 * Auto hide tabs with icon only
 */
Qx--DockAutoHideTab[iconOnly="true"][sideBarLocation="0"] {
        border-top: 6px solid rgba(0, 0, 0, 48);
}

Qx--DockAutoHideTab[iconOnly="true"][sideBarLocation="1"] {
        border-left: 6px solid rgba(0, 0, 0, 48);
}

Qx--DockAutoHideTab[iconOnly="true"][sideBarLocation="2"] {
        border-right: 6px solid rgba(0, 0, 0, 48);
}

Qx--DockAutoHideTab[iconOnly="true"][sideBarLocation="3"] {
        border-bottom: 6px solid rgba(0, 0, 0, 48);
}


/**
 * Auto hide tabs with icon only hover
 */
Qx--DockAutoHideTab:hover[iconOnly="true"][sideBarLocation="0"],
Qx--DockAutoHideTab[iconOnly="true"][sideBarLocation="0"][activeTab="true"] {
        border-top: 6px solid palette(highlight);
}

Qx--DockAutoHideTab:hover[iconOnly="true"][sideBarLocation="1"],
Qx--DockAutoHideTab[iconOnly="true"][sideBarLocation="1"][activeTab="true"] {
        border-left: 6px solid palette(highlight);
}

Qx--DockAutoHideTab:hover[iconOnly="true"][sideBarLocation="2"],
Qx--DockAutoHideTab[iconOnly="true"][sideBarLocation="2"][activeTab="true"] {
        border-right: 6px solid palette(highlight);
}

Qx--DockAutoHideTab:hover[iconOnly="true"][sideBarLocation="3"],
Qx--DockAutoHideTab[iconOnly="true"][sideBarLocation="3"][activeTab="true"] {
        border-bottom: 6px solid palette(highlight);
}



/*****************************************************************************
 * DockAutoHideSideBar
 *****************************************************************************/
Qx--DockAutoHideSideBar{
        background: palette(window);
        border: none;
        qproperty-spacing: 12;
}

#sideTabsContainerWidget {
        background: transparent;
}


Qx--DockAutoHideSideBar[sideBarLocation="0"] {
        border-bottom: 1px solid palette(dark);
}

Qx--DockAutoHideSideBar[sideBarLocation="1"] {
        border-right: 1px solid palette(dark);
}

Qx--DockAutoHideSideBar[sideBarLocation="2"] {
        border-left: 1px solid palette(dark);
}

Qx--DockAutoHideSideBar[sideBarLocation="3"] {
        border-top: 1px solid palette(dark);
}


/*****************************************************************************
 * DockAutoHideContainer
 *****************************************************************************/
Qx--DockAutoHideContainer {
        background: palette(window);
}


Qx--DockAutoHideContainer Qx--DockAreaTitleBar {
        background: palette(highlight);
        padding: 0px;
        border: none;
}


/*
 * This is required because the Qx--DockAreaWidget[focused="true"] will
 * overwrite the Qx--DockAutoHideContainer Qx--DockAreaTitleBar rule
 */
Qx--DockAutoHideContainer Qx--DockAreaWidget[focused="true"] Qx--DockAreaTitleBar {
        background: palette(highlight);
        padding: 0px;
        border: none;
}


#autoHideTitleLabel {
        padding-left: 4px;
        color: palette(light);
}


/*****************************************************************************
 * DockAutoHideContainer titlebar buttons
 *****************************************************************************/
#dockAreaAutoHideButton {
        qproperty-icon: url(:/dock/images/vs-pin-button.svg);
        qproperty-iconSize: 16px;
}

Qx--DockAutoHideContainer #dockAreaAutoHideButton {
        qproperty-icon: url(:/dock/images/vs-pin-button-pinned-focused.svg);
        qproperty-iconSize: 16px;
}


Qx--DockAutoHideContainer #dockAreaCloseButton{
        qproperty-icon: url(:/dock/images/close-button-focused.svg)
}


Qx--DockAutoHideContainer Qx--DockTitleBarButton:hover {
        background: rgba(255, 255, 255, 48);
        border: none;
}

Qx--DockAutoHideContainer Qx--DockTitleBarButton:pressed {
        background: rgba(255, 255, 255, 96);
        border: none;
}

/*****************************************************************************
 * DockAutoHideContainer Titlebar and Buttons
 *****************************************************************************/


/*****************************************************************************
 * DockResizeHandle
 *****************************************************************************/
Qx--DockResizeHandle {
    background: palette(window);
}


Qx--DockAutoHideContainer[sideBarLocation="0"] Qx--DockResizeHandle {
    border-top: 1px solid palette(dark);
}

Qx--DockAutoHideContainer[sideBarLocation="1"] Qx--DockResizeHandle {
    border-left: 1px solid palette(dark);
}

Qx--DockAutoHideContainer[sideBarLocation="2"] Qx--DockResizeHandle {
    border-right: 1px solid palette(dark);
}

Qx--DockAutoHideContainer[sideBarLocation="3"] Qx--DockResizeHandle {
    border-top: 1px solid palette(dark);
}

